home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / pulseaudio.postinst < prev    next >
Text File  |  2009-10-26  |  2KB  |  61 lines

  1. #! /bin/sh
  2. # postinst script for pulseaudio
  3.  
  4. set -e
  5.  
  6. # summary of how this script can be called:
  7. #        * <postinst> `configure' <most-recently-configured-version>
  8. #        * <old-postinst> `abort-upgrade' <new version>
  9. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  10. #          <new-version>
  11. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  12. #          <failed-install-package> <version> `removing'
  13. #          <conflicting-package> <version>
  14. # for details, see http://www.debian.org/doc/debian-policy/ or
  15. # the debian-policy package
  16.  
  17. PULSEAUDIO=/usr/bin/pulseaudio
  18.  
  19. case "$1" in
  20.   configure)
  21.     if ! getent passwd pulse >/dev/null; then
  22.       adduser --disabled-password  --quiet --system \
  23.         --home /var/run/pulse --no-create-home\
  24.         --gecos "PulseAudio daemon" --group pulse
  25.       adduser --quiet pulse audio
  26.     fi
  27.     if ! getent group pulse-access >/dev/null; then
  28.       addgroup --quiet --system pulse-access
  29.     fi
  30.  
  31.     if dpkg --compare-versions "$2" lt-nl "0.9.14-0ubuntu9"; then
  32.     update-rc.d -f pulseaudio remove
  33.     fi
  34.   ;;
  35.   abort-upgrade|abort-remove|abort-deconfigure)
  36.   ;;
  37.   *)
  38.     echo "postinst called with unknown argument \`$1'" >&2
  39.     exit 1
  40.   ;;
  41. esac
  42.  
  43. # Automatically added by dh_installinit
  44. if [ -x "/etc/init.d/pulseaudio" ]; then
  45.     update-rc.d pulseaudio start 50 2 3 4 5 . stop 15 1 . >/dev/null
  46.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  47.         invoke-rc.d pulseaudio start || exit $?
  48.     else
  49.         /etc/init.d/pulseaudio start || exit $?
  50.     fi
  51. fi
  52. # End automatically added section
  53. # Automatically added by dh_makeshlibs
  54. if [ "$1" = "configure" ]; then
  55.     ldconfig
  56. fi
  57. # End automatically added section
  58.  
  59.  
  60. exit 0
  61.